/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ticketManager.controller;

import java.util.ArrayList;
import java.util.List;
import javax.ejb.EJB;
import javax.enterprise.context.RequestScoped;
import javax.inject.Named;
import ticketManager.ejb.UserDAO;
import ticketManager.model.ManagerUser;

/**
 *
 * @author luchenyuxx
 */
@Named
@RequestScoped
public class ListUserController {

    @EJB
    UserDAO ud;
    private List<ManagerUser> usersWanted = new ArrayList<>();

    public List<ManagerUser> getUsersWanted() {
        return usersWanted;
    }

    public String listUsersExcept(Long id) {
        usersWanted = ud.getUsersExcept(id);
        return "listUsersExcept";
    }

    public String listAllUsers() {
        usersWanted = ud.getAllUsers();
        return "listAllUsers";
    }

    public List<ManagerUser> getAllUsers() {
        return ud.getAllUsers();

    }
}
